<configuration>
  <!-- statusListener to avoid logging from Logback itself -->
  <statusListener class="ch.qos.logback.core.status.NopStatusListener" />
  <appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
    <target>System.err</target>
    <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
      <level>INFO</level>
    </filter>
    <encoder>
      <pattern>
        %d{HH:mm:ss.SSS} ms:%-4relative [%thread] %-5level %logger{128} - %msg%n
      </pattern>
    </encoder>
  </appender>
  <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
    <file>${HOME}/bin/log/script.log</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
      <fileNamePattern>logFile%i.log.gz</fileNamePattern>
      <minIndex>1</minIndex>
      <maxIndex>10</maxIndex>
    </rollingPolicy>
    <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
      <maxFileSize>1MB</maxFileSize>
    </triggeringPolicy>
    <encoder>
      <pattern>
        %d{HH:mm:ss.SSS} ms:%-4relative [%thread] %-5level %logger{128} - %msg%n
      </pattern>
      <!-- <outputPatternAsHeader>true</outputPatternAsHeader> -->
    </encoder>
  </appender>
  <root level="DEBUG">
    <appender-ref ref="FILE" />
    <appender-ref ref="STDERR" />
  </root>
  <!-- <logger name="ch.qos.logback" level="OFF" additivity="false" /> -->
</configuration>
